Skip to content

docs(security): review OpenShell v0.0.101 contracts - #8617

Open
apurvvkumaria wants to merge 6 commits into
mainfrom
codex/8599-openshell-v101-contract-review
Open

docs(security): review OpenShell v0.0.101 contracts#8617
apurvvkumaria wants to merge 6 commits into
mainfrom
codex/8599-openshell-v101-contract-review

Conversation

@apurvvkumaria

@apurvvkumaria apurvvkumaria commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Records the exact OpenShell v0.0.99-to-v0.0.101 and public v0.0.85-to-v0.0.101 migration/security boundaries before any selector changes. It freezes the producer/consumer invariants, qualification selectors, credential-boundary evidence, and one-to-one correction ownership required by the upgrade epic.

Related Issue

Fixes #8599

Parent epic: #8590

Changes

  • Add the OpenShell v0.0.101 migration/security review with exact commits, artifacts, inherited concerns, OS101-I01I16, and OS101-C01C05 ownership.
  • Explicitly bind the completed review to parent epic [Epic] Qualify and pin OpenShell v0.0.101 #8590 while retaining its later selector, qualification, and final-candidate gates.
  • Add a newly generated v0.0.101 child-visible credential manifest bound to upstream Git blob identities and downstream sanitizer digests; activation remains owned by Update NemoClaw selectors and pins for OpenShell v0.0.101 #8606.
  • Add contract tests that freeze the reviewed identities, Docker/Podman-only selection, credential boundary, correction routing, parent-epic link, and exact 14-selector/11-final-selector qualification sets.
  • Add the security contract test to the source-shape budget without changing runtime, selector, policy, or qualification behavior.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: This is migration/security evidence and contract freezing; it activates no user-facing behavior.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Independent security, correctness, test-quality, and documentation review passed for the corrected exact commit 5279c514079657101e18231b0c49846c16a9af91 with no Medium-or-higher finding.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: docs/security/openshell-0.0.101-migration-review.md; the writing rules and documentation style were reviewed, and no additional user-facing page is needed because this PR activates no behavior.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every published commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: Review OpenShell v0.0.101 migration and security contracts #8599 contract tests 5/5; gateway launch contracts 10/10; CLI type-check passed; npm run docs completed with 0 errors (two pre-existing Fern warnings); clean Ubuntu root/plugin installs and builds plus source-map validation passed.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: Exact-head GitHub run 31256993579 passed all eight CLI/integration/E2E-support shards plus build/typecheck, static, audit, installer-integration, plugin, and aggregate checks.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Apurv Kumaria akumaria@nvidia.com

Summary by CodeRabbit

  • Security

    • Added a security review for the OpenShell 0.0.101 migration, covering release integrity, credential handling, runtime identity, upgrades, recovery, and isolation requirements.
    • Added a credential-visibility manifest documenting approved sources, environment keys, and runtime-controlled variables.
    • Added safeguards tying generated credential data to reviewed source identities.
  • Tests

    • Added comprehensive migration validation for version evidence, source integrity, credential boundaries, configuration behavior, inherited safeguards, and qualification requirements.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria apurvvkumaria self-assigned this Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cee68a6d-3018-4e5e-9e0f-2a3fc4c00eea

📥 Commits

Reviewing files that changed from the base of the PR and between 7d1c24e and e4e28d2.

📒 Files selected for processing (4)
  • ci/source-shape-test-budget.json
  • docs/security/openshell-0.0.101-migration-review.md
  • src/lib/actions/sandbox/openshell-child-visible-credentials.v0.0.101.json
  • test/openshell-0.0.101-migration-review.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • ci/source-shape-test-budget.json
  • src/lib/actions/sandbox/openshell-child-visible-credentials.v0.0.101.json

📝 Walkthrough

Walkthrough

This change adds the OpenShell 0.0.101 migration review, a generated child-credential visibility manifest, and Vitest validation for source identity, artifact integrity, security boundaries, runtime configuration, inherited invariants, and qualification selectors.

Changes

OpenShell 0.0.101 migration review

Layer / File(s) Summary
Migration and security review contracts
docs/security/openshell-0.0.101-migration-review.md
Defines release boundaries, artifact trust findings, changed contracts, credential-security findings, inherited invariants, correction ownership, and acceptance requirements.
Credential visibility manifest
src/lib/actions/sandbox/openshell-child-visible-credentials.v0.0.101.json, docs/security/openshell-0.0.101-migration-review.md, ci/source-shape-test-budget.json
Adds the versioned credential manifest, records source identities and hashes, defines visible and rewritten keys, and classifies runtime-controlled variables.
Qualification and acceptance validation
test/openshell-0.0.101-migration-review.test.ts, docs/security/openshell-0.0.101-migration-review.md
Validates release identities, manifest integrity, Docker and Podman behavior, inherited invariants, correction ownership, migration handling, and complete and final selector sets.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

Possibly related PRs

  • NVIDIA/NemoClaw#8523: Adds the corresponding OpenShell 0.0.99 migration-review tests and credential manifest.
  • NVIDIA/NemoClaw#8583: Provides related OpenShell compatibility, credential-boundary, and qualification contracts.
  • NVIDIA/NemoClaw#8635: Exercises the OpenShell 0.0.101 migration review through qualification workflows and receipt validation.

Suggested reviewers: cv, senthilr-nv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the security review of OpenShell v0.0.101 contracts, which is the primary change.
Linked Issues check ✅ Passed The review, generated credential manifest, and tests address the required migration boundaries, contract evidence, security controls, ownership, and parent linkage [#8599].
Out of Scope Changes check ✅ Passed The changes remain within the review scope and do not modify selectors, runtime compatibility, policy compatibility, or other unrelated behavior.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/8599-openshell-v101-contract-review

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit ffd9425 in the codex/8599-openshell... branch remains at 96%, unchanged from commit 8096cdd in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit ffd9425 in the codex/8599-openshell... branch remains at 81%, unchanged from commit bb22a5a in the main branch.

Show a code coverage summary of the most impacted files.
File main bb22a5a codex/8599-openshell... ffd9425 +/-
src/lib/policy/...ateway-state.ts 73% 56% -17%
src/lib/policy/index.ts 62% 62% 0%
src/lib/messagi...flow-planner.ts 91% 91% 0%
src/lib/actions...idge-destroy.ts 83% 83% 0%
src/lib/core/immutable.ts 97% 97% 0%
src/lib/messagi...etup-applier.ts 68% 68% 0%
src/lib/messaging/utils.ts 76% 76% 0%
src/lib/sandbox...rce-identity.ts 84% 84% 0%
src/lib/policy/...scope-render.ts 94% 97% +3%
src/lib/onboard...flight-ports.ts 33% 67% +34%

Updated August 09, 2026 20:14 UTC

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/security/openshell-0.0.101-migration-review.md`:
- Around line 22-35: Link the completed migration review to parent epic `#8590` by
adding an explicit reference in the acceptance section of
docs/security/openshell-0.0.101-migration-review.md (lines 22-35), then update
the contract test in test/openshell-0.0.101-migration-review.test.ts (lines
167-186) to assert that `#8590` is present.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0ed40726-7af8-483e-a22f-cf6ebb809c1a

📥 Commits

Reviewing files that changed from the base of the PR and between a76e297 and c005e03.

📒 Files selected for processing (4)
  • ci/source-shape-test-budget.json
  • docs/security/openshell-0.0.101-migration-review.md
  • src/lib/actions/sandbox/openshell-child-visible-credentials.v0.0.101.json
  • test/openshell-0.0.101-migration-review.test.ts

Comment thread docs/security/openshell-0.0.101-migration-review.md
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Failed after a partial review · low confidence · 0 blockers · 0 warnings · 0 suggestions

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

3 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • established — base-trusted at docs/security/openshell-0.0.101-migration-review.md:30: Retain `base-trusted` for code evaluated from the target-branch trust boundary.
  • established — child-visible credential manifest at docs/security/openshell-0.0.101-migration-review.md:262: Retain `child-visible credential manifest` for the versioned credential boundary record.
  • justified — final acceptance subset at docs/security/openshell-0.0.101-migration-review.md:345: Retain `final acceptance subset` because the adjacent list defines its required evidence scope.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite against this exact revision.

Recommended E2E: cloud-inference, managed-image-multiarch-startup, security-posture

2 optional E2E recommendations
  • mcp-bridge
  • openshell-gateway-upgrade

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
apurvvkumaria added a commit that referenced this pull request Aug 9, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Restore the required root-owned, immutable `0444` mode for the reviewed
managed-startup runtime bundle in every managed agent image. The repair
uses each final image's existing permission replay so legacy builders
remain supported and promotion continues to fail closed.

This repair blocks clean trusted main and therefore blocks publication
of the draft-only trust-root bootstrap. It does not directly qualify
#8616 or #8617.

## Changes

- Require the managed-startup runtime bundle to be a regular, non-link
file in the OpenClaw, Hermes, and Deep Agents Code final images.
- Replay `root:root` ownership and mode `0444`, then require the final
numeric stat to be `0:0:444`.
- Preserve the reviewed bundle bytes, original builder-stage copy
provenance, legacy-builder compatibility, six-variant validation, and
aggregate promotion barrier.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification: The
supported managed-image workflow validator checks regular-file,
non-link, and `0:0:444` invariants for all six agent/architecture
candidates before aggregate promotion. Focused image-layout and workflow
contracts passed for this commit.
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: This restores an existing
internal image artifact invariant and changes no command, configuration,
default, documented workflow, or supported surface.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: Fresh independent
correctness/security review of commit
`591550ad54cc43b7b18982712b16d40902f41a29` passed all nine security
categories with no findings.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: Commit 591550a restores the existing root-owned, read-only
managed-image runtime artifact contract in three Dockerfiles. It changes
no command, configuration, default, documented workflow, or supported
surface.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 591550a -->
<!-- docs-review-agents-blob-sha: c4923a3 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `47` focused image/layout/workflow
tests passed; the targeted Deep Agents Code compatibility contract
passed.
- [ ] Applicable broad gate passed — Not applicable to this
three-Dockerfile permission repair; `npm run checks:repository`,
Dockerfile lint, reviewed-bundle verification, and the source-shape
audit passed.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Final resolution still requires the first automatic exact-main
managed-image run after external merge to pass all six validation jobs
and artifact receipts. No manual E2E run was dispatched.

---
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Strengthened container image validation to ensure the managed startup
runtime is present as a regular, non-symlink file.
* Confirmed the runtime file is root-owned and has read-only permissions
before startup checks complete.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete change and the delta since the previous review. No correctness, compatibility, security, test, or documentation blocker found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review OpenShell v0.0.101 migration and security contracts

2 participants